﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace DataEntity
{
   public  class SpeedEntity : INotifyPropertyChanged
    {
        private int _ID;

        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        
        private float _Speed;
        public float Speed
        {
            get { return _Speed; }
            set
            {
                if (_Speed != value)
                {
                    _Speed = value;
                    this.OnPropertyChanged("Speed");
                }
            }
        }

        private int _ProjectID;
        public int ProjectID
        {
            get { return _ProjectID; }
            set { _ProjectID = value; }
        }

        private string _ExperimentType;
        public string ExperimentType
        {
            get { return _ExperimentType; }
            set { _ExperimentType = value; }
        }
        

        #region PropertyChanged事件
        public event PropertyChangedEventHandler PropertyChanged;

        public void OnPropertyChanged(string PropName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(PropName));
            }
        }
        #endregion

        public override string ToString()
        {
            return ExperimentType + ":" + Speed + ";";
        }

        public string Text
        {
            get { return ToString(); }
        }

        private string _Type = SpeedEntityTyp.航速.ToString();
        public string Type
        {
            get { return _Type; }
            set
            {
                _Type = value;
            }
        }
    }
}
